home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / gfxcard / chunkyppc / chunkyppc_protos.h < prev    next >
C/C++ Source or Header  |  1999-11-29  |  11KB  |  299 lines

  1. #ifndef CHUNKYPPC_PROTOS_H
  2. #define CHUNKYPPC_PROTOS_H
  3.  
  4. #include <exec/types.h>
  5. #include <graphics/gfx.h>
  6. #include <intuition/intuition.h>
  7. #include <libraries/asl.h>
  8. #include <cybergraphics/cybergraphics.h>
  9.  
  10. #define BIT16 1
  11. #define BIT16_SWAP 2
  12. #define BIT16_ROT 4
  13. #define BIT16_SWAP_ROT 8
  14. #define BIT24 16
  15. #define BIT24_ROT 32
  16. #define BIT32 64
  17. #define BIT32_SWAP 128
  18. #define BIT32_ROT 256
  19. #define BIT32_SWAP_ROT 512
  20. #define BIT32_ROT_REVERSE 1024
  21. #define BIT32_SWAP_ROT_REVERSE 2048
  22. #define BIT8 4096
  23.  
  24. struct Soff
  25. {
  26.  int x;
  27.  int y;
  28. };
  29.  
  30. struct Buffers
  31. {
  32.  UBYTE *address;
  33.  UBYTE *mask;
  34. };
  35.  
  36. struct Mode_Screen
  37. {
  38.     struct Screen *video_screen;
  39.     struct Window *video_window;
  40.     int bpr;
  41.     int wb_int;
  42.     int pip_int;
  43.     int dbuf_int;
  44.     int oldstyle_int;
  45.     char pubscreenname[512];
  46.     int mode;
  47.     int SCREENWIDTH;
  48.     int SCREENHEIGHT;
  49.     int MAXWIDTH;
  50.     int MAXHEIGHT;
  51.     int MINDEPTH;
  52.     int MAXDEPTH;
  53.     int format;
  54.     int video_depth;
  55.     UWORD *emptypointer;
  56.     struct BitMap *video_tmp_bm;
  57.     int video_is_native_mode;
  58.     int video_is_cyber_mode;
  59.     unsigned char *screen;
  60.     int video_oscan_height;
  61.     int bufnum;
  62.     struct RastPort *video_rastport;
  63.     struct BitMap *bitmapa;
  64.     struct BitMap *bitmapb;
  65.     struct BitMap *bitmapc;
  66.     struct BitMap *thebitmap;
  67.     struct RastPort *video_temprp;
  68.     struct ScreenModeRequester *video_smr;
  69.     int ham_int;
  70.     UBYTE *wbcolors;
  71.     UBYTE *transtable;
  72.     unsigned long *WBColorTable;
  73.     unsigned long *ColorTable;
  74.     int pal_changed;
  75.     int pen_obtained;
  76.     unsigned char *screenb;
  77.     unsigned char *screenc;
  78.     int numbuffers;
  79.     int rtgm_int;
  80.     struct ScreenBuffer *Buf1;
  81.     struct ScreenBuffer *Buf2;
  82.     struct ScreenBuffer *Buf3;
  83.     void * (*algo)(struct Mode_Screen *ms,unsigned char *dest,unsigned char *src, int srcformat,void *(*hook68k)(unsigned char *data),unsigned char *data);
  84.     void (*Internal1)(void);
  85.     void (*Internal2)(void);
  86.     int onlyptr;
  87.     int cgxlike;
  88. };
  89.  
  90. struct Mode_Screen *OpenGraphics(char *Title, struct Mode_Screen *ms,int override);
  91. void CloseGraphics(struct Mode_Screen *ms, int shutdownlibs);
  92. void LoadColors(struct Mode_Screen *ms, ULONG *Table);
  93. void DoubleBuffer(struct Mode_Screen *ms);
  94. int ChunkyInit68k(struct Mode_Screen *ms, int srcformat);
  95.  
  96. extern "AmigaLib" ChunkyPPCBase
  97. {
  98.  void ChunkyNoffFast_(struct Library *,UBYTE *, UBYTE *, int, int, int) = -30;
  99.  void ChunkyNoffFastest_(struct Library *,UBYTE *, UBYTE *, int, int, int) = -36;
  100.  void ChunkyNoffNormal_(struct Library *,UBYTE *, UBYTE *, int, int, int) = -42;
  101.  void ChunkyFast_(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int) = -48;
  102.  void ChunkyFastest_(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int) = -54;
  103.  void ChunkyNormal_(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int) = -60;
  104.  void ChunkyFastFull_(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int) = -66;
  105.  void ChunkyFastestFull_(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int) = -72;
  106.  void ChunkyNormalFull_(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int) = -78;
  107.  void c2p_1_(struct Library *,UBYTE *, struct BitMap *, int, int) = -84;
  108.  void c2p_2_(struct Library *,UBYTE *, UBYTE *, UBYTE *, int) = -90;
  109.  void c2p_3_(struct Library *,void *, void *, int , int , struct Soff * , int , int) = -96;
  110.  void c2p_4_(struct Library *,ULONG *,UBYTE *, UBYTE *, struct Soff *,struct Soff *, struct Soff *) = -102;
  111.  void ChunkyNoffFastHT_(struct Library *,UBYTE *,UBYTE *,int,int,int,int) = -108;
  112.  void ChunkyNoffFastestHT_(struct Library *,UBYTE *,UBYTE *,int,int,int,int) = -114;
  113.  void ChunkyNoffNormalHT_(struct Library *,UBYTE *,UBYTE *,int,int,int,int) = -120;
  114.  void ChunkyFastHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int) = -126;
  115.  void ChunkyFastestHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int) = -132;
  116.  void ChunkyNormalHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int) = -138;
  117.  void ChunkyFastFullHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *,struct Soff *,int) = -144;
  118.  void ChunkyFastestFullHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *, struct Soff *, int) = -150;
  119.  void ChunkyNormalFullHT_(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *,struct Soff *, int) = -156;
  120.  void ChunkyNoffMask_(struct Library *,struct Buffers *,UBYTE *,int,int,int,int) = -162;
  121.  void ChunkyMask_(struct Library *,struct Buffers *,UBYTE *,struct Soff *,int,int,int,int) = -168;
  122.  void ChunkyMaskFull_(struct Library *,struct Buffers *,UBYTE *,struct Soff *, struct Soff *,struct Soff *,struct Soff *, int) = -174;
  123.  void c2p_HI_(struct Library *, UBYTE *, int, UBYTE *, UBYTE *, UBYTE *, UBYTE *, UBYTE *) = -180;
  124.  void ham_c2p_(struct Library *, unsigned char *, unsigned char *, int, int, int, int, int) = -186;
  125.  int ChunkyInit_(struct Library *,struct Mode_Screen *ms, int srcformat) = -192;
  126. }
  127.  
  128. __inline int ChunkyInit(struct Mode_Screen *ms, int srcformat)
  129. {
  130.  extern struct Library *ChunkyPPCBase;
  131.  return ChunkyInit_(ChunkyPPCBase,ms,srcformat);
  132. }
  133.  
  134. __inline void ham_c2p(unsigned char *chunky, unsigned char *planar, int width, int height, int depth, int qual, int ham_width)
  135. {
  136.  extern struct Library *ChunkyPPCBase;
  137.  ham_c2p_(ChunkyPPCBase,chunky,planar,width,height,depth,qual,ham_width);
  138. }
  139.  
  140. __inline void c2p_HI(UBYTE *address, int num, UBYTE *bpl0, UBYTE *bpl1, UBYTE *bpl2, UBYTE *bpl3, UBYTE *bpl4)
  141. {
  142.  extern struct Library *ChunkyPPCBase;
  143.  c2p_HI_(ChunkyPPCBase,address,num,bpl0,bpl1,bpl2,bpl3,bpl4);
  144. }
  145.  
  146. __inline void ChunkyNoffFast(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  147. {
  148.  extern struct Library *ChunkyPPCBase;
  149.  ChunkyNoffFast_(ChunkyPPCBase,address,data,w,h,bpr);
  150. }
  151.  
  152. __inline void ChunkyNoffFastest(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  153. {
  154.  extern struct Library *ChunkyPPCBase;
  155.  ChunkyNoffFastest_(ChunkyPPCBase,address,data,w,h,bpr);
  156. }
  157.  
  158. __inline void ChunkyNoffNormal(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  159. {
  160.  extern struct Library *ChunkyPPCBase;
  161.  ChunkyNoffNormal_(ChunkyPPCBase,address,data,w,h,bpr);
  162. }
  163.  
  164. __inline void ChunkyFast(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  165. {
  166.  extern struct Library *ChunkyPPCBase;
  167.  ChunkyFast_(ChunkyPPCBase,address,data,x,y,w,h,bpr);
  168. }
  169.  
  170. __inline void ChunkyFastest(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  171. {
  172.  extern struct Library *ChunkyPPCBase;
  173.  ChunkyFastest_(ChunkyPPCBase,address,data,x,y,w,h,bpr);
  174. }
  175.  
  176. __inline void ChunkyNormal(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  177. {
  178.  extern struct Library *ChunkyPPCBase;
  179.  ChunkyNormal_(ChunkyPPCBase,address,data,x,y,w,h,bpr);
  180. }
  181.  
  182. __inline void ChunkyFastFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  183. {
  184.  extern struct Library *ChunkyPPCBase;
  185.  ChunkyFastFull_(ChunkyPPCBase,address,data,dest,size,bpr,soff,sbpr);
  186. }
  187.  
  188. __inline void ChunkyFastestFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  189. {
  190.  extern struct Library *ChunkyPPCBase;
  191.  ChunkyFastestFull_(ChunkyPPCBase,address,data,dest,size,bpr,soff,sbpr);
  192. }
  193.  
  194. __inline void ChunkyNormalFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  195. {
  196.  extern struct Library *ChunkyPPCBase;
  197.  ChunkyNormalFull_(ChunkyPPCBase,address,data,dest,size,bpr,soff,sbpr);
  198. }
  199.  
  200. __inline void c2p_1(UBYTE *buffer, struct BitMap *bm, int width, int height)
  201. {
  202.  extern struct Library *ChunkyPPCBase;
  203.  c2p_1_(ChunkyPPCBase,buffer,bm,width,height);
  204. }
  205.  
  206. __inline void c2p_2(UBYTE *buffer, UBYTE *plane0, UBYTE *helpbfr, int PlaneSize)
  207. {
  208.  extern struct Library *ChunkyPPCBase;
  209.  c2p_2_(ChunkyPPCBase,buffer,plane0,helpbfr,PlaneSize);
  210. }
  211.  
  212. __inline void c2p_3(void *chunky, void *bitplanes, int chunkyx, int chunkyy, struct Soff *soff, int bitplanesize, int depth)
  213. {
  214.  extern struct Library *ChunkyPPCBase;
  215.  c2p_3_(ChunkyPPCBase,chunky,bitplanes,chunkyx,chunkyy,soff,bitplanesize,depth);
  216. }
  217.  
  218. __inline void c2p_4(void *chunky, UBYTE *Planar, UBYTE *temp, struct Soff *size, struct Soff *off, struct Soff *screensize)
  219. {
  220.  extern struct Library *ChunkyPPCBase;
  221.  c2p_4_(ChunkyPPCBase,chunky,Planar,temp,size,off,screensize);
  222. }
  223.  
  224. __inline void ChunkyNoffFastHT(UBYTE *address,UBYTE *data,int w,int h,int bpr,int gfx_type)
  225. {
  226.  extern struct Library *ChunkyPPCBase;
  227.  ChunkyNoffFastHT_(ChunkyPPCBase,address,data,w,h,bpr,gfx_type);
  228. }
  229.  
  230. __inline void ChunkyNoffFastestHT(UBYTE *address,UBYTE *data,int w,int h,int bpr,int gfx_type)
  231. {
  232.  extern struct Library *ChunkyPPCBase;
  233.  ChunkyNoffFastestHT_(ChunkyPPCBase,address,data,w,h,bpr,gfx_type);
  234. }
  235.  
  236. __inline void ChunkyNoffNormalHT(UBYTE *address ,UBYTE *data,int w,int h,int bpr,int gfx_type)
  237. {
  238.  extern struct Library *ChunkyPPCBase;
  239.  ChunkyNoffNormalHT_(ChunkyPPCBase,address,data,w,h,bpr,gfx_type);
  240. }
  241.  
  242. __inline void ChunkyFastHT(UBYTE *address,UBYTE *data,struct Soff *off,int w,int h,int bpr,int gfx_type)
  243. {
  244.  extern struct Library *ChunkyPPCBase;
  245.  ChunkyFastHT_(ChunkyPPCBase,address,data,off,w,h,bpr,gfx_type);
  246. }
  247.  
  248. __inline void ChunkyFastestHT(UBYTE *address,UBYTE *data,struct Soff *off,int w,int h,int bpr,int gfx_type)
  249. {
  250.  extern struct Library *ChunkyPPCBase;
  251.  ChunkyFastestHT_(ChunkyPPCBase,address,data,off,w,h,bpr,gfx_type);
  252. }
  253.  
  254. __inline void ChunkyNormalHT(UBYTE *address,UBYTE *data,struct Soff *off,int w,int h,int bpr,int gfx_type)
  255. {
  256.  extern struct Library *ChunkyPPCBase;
  257.  ChunkyNormalHT_(ChunkyPPCBase,address,data,off,w,h,bpr,gfx_type);
  258. }
  259.  
  260. __inline void ChunkyFastFullHT(UBYTE *address,UBYTE *data,struct Soff *dest,struct Soff *size,struct Soff *bpr,struct Soff *soff,int gfx_type)
  261. {
  262.  extern struct Library *ChunkyPPCBase;
  263.  ChunkyFastFullHT_(ChunkyPPCBase,address,data,dest,size,bpr,soff,gfx_type);
  264. }
  265.  
  266. __inline void ChunkyFastestFullHT(UBYTE *address,UBYTE *data,struct Soff *dest,struct Soff *size,struct Soff *bpr, struct Soff *soff, int gfx_type)
  267. {
  268.  extern struct Library *ChunkyPPCBase;
  269.  ChunkyFastestFullHT_(ChunkyPPCBase,address,data,dest,size,bpr,soff,gfx_type);
  270. }
  271.  
  272. __inline void ChunkyNormalFullHT(UBYTE *address,UBYTE *data,struct Soff *dest,struct Soff *size,struct Soff *bpr,struct Soff *soff, int gfx_type)
  273. {
  274.  extern struct Library *ChunkyPPCBase;
  275.  ChunkyNormalFullHT_(ChunkyPPCBase,address,data,dest,size,bpr,soff,gfx_type);
  276. }
  277.  
  278. __inline void ChunkyNoffMask(struct Buffers *address,UBYTE *data,int w,int h,int bpr,int gfx_type)
  279. {
  280.  extern struct Library *ChunkyPPCBase;
  281.  ChunkyNoffMask_(ChunkyPPCBase,address,data,w,h,bpr,gfx_type);
  282. }
  283.  
  284. __inline void ChunkyMask(struct Buffers *address,UBYTE *data,struct Soff *dest,int w,int h,int bpr,int gfx_type)
  285. {
  286.  extern struct Library *ChunkyPPCBase;
  287.  ChunkyMask_(ChunkyPPCBase,address,data,dest,w,h,bpr,gfx_type);
  288. }
  289.  
  290. __inline void ChunkyMaskFull(struct Buffers *address,UBYTE *data,struct Soff *dest, struct Soff *size,struct Soff *bpr,struct Soff *soff, int gfx_type)
  291. {
  292.  extern struct Library *ChunkyPPCBase;
  293.  ChunkyMaskFull_(ChunkyPPCBase,address,data,dest,size,bpr,soff,gfx_type);
  294. }
  295.  
  296. #endif
  297.  
  298.  
  299.